home *** CD-ROM | disk | FTP | other *** search
Makefile | 1994-08-18 | 5.3 KB | 190 lines |
- #############################################################
- # Makefile for the Linux Network Administrators' Guide
- # Copyright (C) Olaf Kirch, 1992, 1993, 1994.
- #
- #############################################################
- VERSION=1.0
-
- #############################################################
- # set this to a4 or legal, depending on the paper size your
- # printer understands. Currently, the only effect of this is
- # that dvips will be forced to output the appropiate size.
- # The paper size is _not_ given to latex.
- #############################################################
- PAPER=letter
-
- #############################################################
- # Get the filesets for the various format distributions
- #############################################################
- include FILESETS
-
- #############################################################
- # Commands
- # Note that for making the distribution, you must have
- # GNU tar (or any other tar that supports the -T option)
- #############################################################
- TEXIFY = texify
- MAKEINFO = makeinfo
- TEXI2ROFF = texi2roff
- TAR = tar
- SHELL = /bin/sh
-
- CRUFT = *.aux *.toc *.lof *.log
-
- #############################################################
- # Rules section
- #############################################################
- .SUFFIXES: .fig .eepic .epsf .idx .ind
-
- all: dvi # default target
-
- clean: cleantex cleanps cleaninfo cleanroff
- rm -f aux/*/* nag.dvi nagps.dvi index/*
-
- #############################################################
- # Targets relating to TeX/DVI/PS
- #############################################################
- dvi: nag.dvi
- psdvi: nagps.dvi
- ps: nagps.dvi
- dvips -t $(PAPER) nagps.dvi -o nag.ps
-
- nag.dvi:$(TEXDEP)
- @if [ ! -f aux/dvi/nag.aux -a ! -f .recurse ]; then\
- echo;\
- echo "I see you're building $@ for the first time.";\
- echo "I will therefore run LaTeX three times...";\
- echo "(Maybe you would want to have a coffee now?)";\
- echo;\
- sleep 1;\
- touch .recurse;\
- make $@; touch $(TEXDEP); \
- make $@; touch $(TEXDEP); \
- rm -f .recurse; \
- fi
- TEXINPUTS=styles/latex:aux/dvi:.//:$$TEXINPUTS: \
- latex nag.tex;
- -mv $(CRUFT) aux/dvi
- @if [ -f nag.idx ]; then \
- mv nag.idx index && make index/nag.ind; \
- fi
-
- nagps.dvi: $(PSDEP)
- @if [ ! -f aux/dvips/nagps.aux -a ! -f .recurse ]; then\
- echo;\
- echo "I see you're building $@ for the first time.";\
- echo "I will therefore run LaTeX three times...";\
- echo "(Maybe you would want to have a coffee now?)";\
- echo;\
- sleep 1;\
- touch .recurse;\
- make $@; touch $(PSDEP); \
- make $@; touch $(PSDEP); \
- rm -f .recurse; \
- fi
- TEXINPUTS=styles/latex:aux/dvips/:.//:$$TEXINPUTS: \
- latex nagps.tex;
- -mv $(CRUFT) aux/dvips
- @if [ -f nagps.idx ]; then \
- mv nagps.idx index && make index/nagps.ind; \
- fi
-
- spollchuck:
- echo "Checking for misspellings (not a big win, tho)"
- ../bin/makewords $(TEXALL)
-
- cleantex:
- rm -f nag.dvi index/nag.* aux/dvi/*
-
- cleanps:
- rm -f nagps.dvi nag.ps index/nagps.* aux/dvips/*
-
- #############################################################
- # Targets relating to TeXinfo/Info
- #############################################################
- texi: net.texi
-
- info: netguide
-
- netguide:$(TEXI)
- $(MAKEINFO) nag.texi
-
- net.texi:$(TEXIDEP)
- $(TEXIFY) net.tex
- $(TEXIFY) net.tex
-
- cleaninfo:
- rm -f netguide netguide-[0-9] netguide-[0-9][0-9] \
- net.texi net.auxi net.ff net.menu aux/info/*
-
- #############################################################
- # Targets relating to groff/ASCII. These targets require
- # that you have LoTeX-0.9
- #############################################################
- roff: $(ROFF)
- ascii: nag.ascii
-
- nag.mm:$(ROFFDEP)
- @echo "Making the GNU roff version... this may take between"
- @echo "a few minutes (or longer)."
- LOTEXINCLUDES=aux/mm:.//: LOTEXSTYLES=styles/lotex lotex nagmm
- mv nagmm.mm nag.mm
- mv *.auxl aux/mm
-
- nag.ascii:$(ROFF)
- rm -f *.qrf
- @$(MAKE) rungroff
- makeroffidx net.idxl
- @$(MAKE) rungroff
-
- rungroff:
- (groff -t -Tascii -mgm nag.mm | colcrt - > nag.ascii) 2>&1 | \
- tee nagasc.log
-
- cleanroff:
- rm -f nag.mm nag.ascii aux/mm/* index/nagmm.*
-
- #############################################################
- # Targets relating to fig picture conversion
- #############################################################
- .fig.eepic:
- fig2dev -Leepic $< > $@
- .fig.epsf:
- fig2dev -Lps $< > $@
-
- #############################################################
- # Targets relating to index generation
- #############################################################
- .idx.ind:
- @echo Generating index for $?.dvi
- makeindex $<
-
- #############################################################
- # Make distribution files
- #############################################################
- dist: src-dist dvi-dist ps-dist roff-dist
-
- src-dist:
- @ls $(SRCDIST)
-
- dvi-dist:dvi
- @ls $(DVIDIST) | sed "s/^/.\/netguide\//" > MANIFEST
- -cd ..; $(TAR) -cvf - -T netguide/MANIFEST |\
- gzip > nagdvi-$(VERSION).tgz
-
- ps-dist: ps
- @ls $(PSDIST) | sed "s/^/.\/netguide\//" > MANIFEST
- -cd ..; $(TAR) -cvf - -T netguide/MANIFEST |\
- gzip > nagps-$(VERSION).tgz
-
- texi-dist:texi
- @ls $(TEXIDIST) | sed "s/^/.\/netguide\//" > MANIFEST
- -cd ..; $(TAR) -cvf - -T netguide/MANIFEST |\
- gzip > nagtexi-$(VERSION).tgz
-
- roff-dist:roff
- @ls $(ROFFDIST) | sed "s/^/.\/netguide\//" > MANIFEST
- -cd ..; $(TAR) -cvf - -T netguide/MANIFEST |\
- gzip > nagroff-$(VERSION).tgz
-
-